
/*
 * Component: Timeline
 * -------------------
 * 因为 element-ui 有同类产品，暂未使用当前组件
 * 优化方向：与 box 组件结合，当前组件删除 header/footer/body 等设计
 */
.timeline {
  position: relative;
  margin: 0 0 30px 0;
  padding: 0;
  list-style: none;

  &:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ddd;
    left: 31px;
    margin: 0;
    border-radius: 2px;
  }

  > li {
    position: relative;
    margin-right: 10px;
    margin-bottom: 15px;

    &:before,
    &:after {
      content: " ";
      display: table;
    }

    &:after {
      clear: both;
    }

    // timeline-item
    > .timeline-item {
      box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
      border-radius: 3px;
      margin-top: 0;
      background: #FFF;
      color: #444;
      margin-left: 60px;
      margin-right: 15px;
      padding: 0;
      position: relative;

      > .time {
        color: #999;
        float: right;
        padding: 10px;
        font-size: 12px;
      }

      > .timeline-header {
        margin: 0;
        color: #555;
        border-bottom: 1px solid #f4f4f4;
        padding: 10px;
        font-size: 16px;
        line-height: 1.1;

        > a {
          font-weight: 600;
        }
      }

      > .timeline-body,
      > .timeline-footer {
        padding: 10px;
      }
    }

    // font-icon
    > .fa,
    > .glyphicon,
    > .ion {
      width: 30px;
      height: 30px;
      font-size: 15px;
      line-height: 30px;
      position: absolute;
      color: #666;
      background: #d2d6de;
      border-radius: 50%;
      text-align: center;
      left: 18px;
      top: 0;
    }
  }

  // 时间框
  > .time-label > span {
    font-weight: 600;
    padding: 5px;
    display: inline-block;
    background-color: #FFF;
    border-radius: 4px;
  }
}

// 增强现实，以盒模型展示所有内容
.timeline-inverse {
  > li > .timeline-item {
    background: #f0f0f0;
    border: 1px solid #ddd;
    box-shadow: none;

    > .timeline-header {
      border-bottom-color: #ddd;
    }
  }
}